:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 导航栏样式 */
header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary-color);
    color: white;
}

/* Hero区域样式 */
.hero {
    margin-top: 80px;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f6f8fd 0%, #f1f4f9 100%);
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing-effect {
    border-right: 3px solid var(--primary-color);
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color) }
}

.search-box {
    max-width: 500px;
    margin: 2rem auto;
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--secondary-color);
}

/* 文章卡片样式 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.post {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.post:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.post-thumbnail {
    position: relative;
    height: 200px;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* 分类卡片样式 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 订阅区域样式 */
.newsletter {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin: 4rem 0;
}

.subscribe-form {
    max-width: 500px;
    margin: 2rem auto;
    display: flex;
    gap: 1rem;
}

.subscribe-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 25px;
}

.subscribe-form button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

/* 页脚样式 */
footer {
    background: var(--dark-gray);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .search-box {
        flex-direction: column;
    }

    .subscribe-form {
        flex-direction: column;
    }
} 

/* 修改文章网格布局部分 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 两列 */
    grid-auto-flow: column; /* 改变排列方向为按列排列 */
    gap: 2rem;
    width: 100%;
    margin: 0 auto;
}

/* 确保文章卡片样式 */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 2rem; /* 添加底部间距 */
}

.featured {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

/* 文章容器 */
.articles-container {
    display: flex;
    gap: 30px;
}

/* 左右列 */
.column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 文章卡片 */
.article {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tag {
    display: inline-block;
    padding: 5px 15px;
    background: #007bff;
    color: white;
    border-radius: 15px;
    font-size: 14px;
    margin-bottom: 15px;
}

.article h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.article p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.meta {
    display: flex;
    gap: 15px;
    color: #888;
    font-size: 14px;
}

.meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .articles-container {
        flex-direction: column;
    }
}